-- GENERATED SPELL FOR [Chancellor Bloodleaf] --


function spell0_22012(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(34517,pUnit)
pUnit:RegisterEvent('Sorts_22012', 647, 1)
end

function spell1_22012(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(15791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22012', 547, 1)
end

function Sorts_22012(pUnit, Event)
local choix_sorts_22012 = math.random(0, 1)
if choix_sorts_22012 == 0 then
pUnit:RegisterEvent('spell0_22012', 1, 1)
end
if choix_sorts_22012 == 1 then
pUnit:RegisterEvent('spell1_22012', 1, 1)
end
end

function mob22012_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22012', math.random(1500, 3000), 1)
end

function mob22012_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22012_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22012_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22012, 1, 'mob22012_Action')
RegisterUnitEvent(22012, 2, 'mob22012_Leave')
RegisterUnitEvent(22012, 3, 'mob22012_Kill')
RegisterUnitEvent(22012, 4, 'mob22012_Die')
